package com.app.xinfadi.dao_bean.ceshi;

import com.app.xinfadi.dao_bean.bean.ProductCategoryListBean;
import com.app.xinfadi.dao_bean.bean.prodect.ProductCategoryBean;
import com.app.xinfadi.dao_bean.bean.prodect.ProductFourCategoryBean;
import com.app.xinfadi.dao_bean.bean.prodect.ProductSecondCategoryBean;
import com.app.xinfadi.dao_bean.bean.prodect.ProductThirdCategoryBean;
import com.app.xinfadi.util.LogUtil;
import com.google.gson.Gson;

/**
 * function:
 * Created by Wutengfei on 2016/1/27.
 */
public class Ceshi {
    private static final java.lang.String TAG = "Ceshi";
    public Ceshi (){

    }
    public void testProdect() {
        ProductCategoryListBean productCategoryListBean = new ProductCategoryListBean();
        String productCategoryList[] = {"蔬菜", "海鲜"};
        String productSecondCategoryList[] = {"坚果类", "干果类"};
        String productThirdCategoryList[] = {"苹果", "香蕉"};
        String productFourCategoryList[] = {"红富士", "黄香蕉"};

        for (String productCategoryItem : productCategoryList) {
            ProductCategoryBean productCategoryBean = new ProductCategoryBean();
            productCategoryBean.name = productCategoryItem;
            productCategoryListBean.productCategoryBeanList.add(productCategoryBean);
            for (String productSecondCategoryItem : productSecondCategoryList) {
                ProductSecondCategoryBean productSecondCategoryBean = new ProductSecondCategoryBean();
                productCategoryBean.name = productSecondCategoryItem;
                productCategoryBean.productSecondCategoryBeanList.add(productSecondCategoryBean);
                for (String productThridCategoryItem : productThirdCategoryList) {
                    ProductThirdCategoryBean productThirdCategoryBean = new ProductThirdCategoryBean();
                    productThirdCategoryBean.name = productThridCategoryItem;
                    productSecondCategoryBean.productThirdCategoryBeanList.add(productThirdCategoryBean);
                }
            }
        }
        Gson gson = new Gson();
        LogUtil.e(TAG, gson.toJson(productCategoryListBean));
    }
}
